<?php
namespace middleware;

use Webman\MiddlewareInterface;
use Webman\Http\Response;
use Webman\Http\Request;
use utils\Cache;
use think\facade\Db;


class BaseConfig implements MiddlewareInterface
{
    public function process(Request $request, callable $handler) : Response
    {
        Cache::remember('base_config', 60, function(){
			return Db::name('base_config')->select()->column('data','name');
		});
		
		return $handler($request);
    }
}